package com.xs.designpattern;

import lombok.extern.slf4j.Slf4j;

/**
 * 愤怒状态的类
 * @author xs
 */
@Slf4j
public class AngryState implements State{
    private final Mammoth mammoth;

    public AngryState(Mammoth mammoth) {
        this.mammoth = mammoth;
    }

    @Override
    public void observe() {
        log.info("{} 很愤怒!", mammoth);
    }

    @Override
    public void onEnterState() {
        log.info("{} 生气了!", mammoth);
    }
}
